import { appWithTranslation } from "next-i18next";
import { useEffect } from "react";
import { useRouter } from "next/router.js";

import nextI18NextConfig from "../next-i18next.config.js";

const MyApp = ({ Component, pageProps }) => {
  const router = useRouter();
  // 想通过拿到的浏览器语言，改变next-i18next的语言
  return <Component {...pageProps} />;
};

export default appWithTranslation(MyApp, nextI18NextConfig);
